#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
//	system("start https://www.lanqiao.cn/problems/3918/learning/");

	int n, m, p, h;
	cin >> n >> m >> p;

	vector<int> a(n), b(m), c(p);

	for (int &i : a)	cin >> i;
	for (int &i : b)	cin >> i;
	for (int &i : c)	cin >> i;

	cin >> h;

	sort(a.begin(), a.end());
	sort(b.begin(), b.end());
	sort(c.begin(), c.end());

	vector<int> ans(3);
	int delta = 2e10;

	bool flag = 0;

	for (int i : a) {
		if (i >= h)	continue;

		for (int j : b) {
			if (i + j >= h)	continue;

			auto k = upper_bound(c.begin(), c.end(), h - i - j) - 1;
			if (*k == h - i - j) {
				flag = 1;

				int newDelta = max(i, max(j, *k)) - min(i, min(j, *k));
				if (newDelta < delta) {
					ans = {i, j, *k};
					delta = newDelta;
				}
			}
		}
	}

	if (flag)
		cout << ans[0] << " " << ans[1] << " " << ans[2];
	else
		cout << "-1";

	return 0;
}
